Due to the amazing power of computers, computers are widely used to implement diversified tasks such as data processing tasks, amusement-related tasks or communication tasks. With the increasing development of digitalized generation, the data storage density for the conventional data storage media might become unsatisfactory soon for receiving and storing a great amount of data. For dealing with such a problem, a single data storage medium with a very large quantity of storage capacity or a plurality of data storage media are used in a computer system. Conventionally, data stored in a data storage medium are read via a disk drive that is operated mechanically. Therefore, the operating speed of the disk drive likely fails to catch up with the high processing speed of the central processing unit (CPU). For matching the operating speed of the disk drive and the processing speed of the central processing unit, a configuration of RAID (Redundant Array of Inexpensive Disk) is proposed. In the RAID system, multiple disk drives are used to store the same data in order to increase the data transfer rate and data security. In a case that one of the multiple disk drives has a breakdown, the lost data can be restored according to an interactive encoding technology among the disk drives.
Referring to FIG. 1, a RAID configuration is schematically illustrated. The RAID system includes three hard disk drives 101, 102 and 103 and exhibits a parallel-with-parity function. The hard disk drives 101 and 102 are used to store respective data while the third hard disk drive 103 is for storing parity data obtained by operating the data in the hard disk drives 101 and 102 for securing data. For example, assuming a data D1 is stored in a first block of the hard disk drive 101, and a data D2 is stored in a second block of the hard disk drive 102, wherein the first block and the second block have the same addresses. Meanwhile, in a third block of the hard disk drive 103 having the same address as the first and second blocks, a polarity data P, which is obtained by way of an exclusive OR gate (XOR) operation of the data D1 and D2 and expressed as P=D1⊕D2, is stored.
With the presence of polarity data, associated data, if lost, can be rebuilt. For example, if the hard disk drive 102 is damaged so as to lose the data D2, then the data D1 and the polarity data P can be read from the hard disk drives 101 and 103 to perform a logical XOR operation D1⊕P, thereby rebuilding the data D2. In principle, all the data previously stored in the damaged hard disk drive 102 can be rebuilt based on the corresponding data in the first and third hard disk drives 101 and 103, and stored back to the hard disk drive 102 after it is fixed up. It is understood that for offering the fault-tolerant benefits of RAID, it is necessary, when a data in one of the hard disk drives is overwritten, to make additional efforts to read and write data from/to hard disk drives other than the hard disk drive actually accessed. For example, in a case that the data D1 is refreshed as D1′, the data D2 stored in the hard disk drive 102 needs to be read out and subjected to a XOR operation with the data D1′ to update the polarity data in the hard disk drive 103 to P′=D1′⊕+D2.
Since general self-supporting RAID systems are undesirable in cost and size, a cost-effective RAID card capable of being integrated into a computer casing is developed. Referring to FIG. 2, a schematic block diagram of a RAID card used with a computer system is illustrated. The RAID card 20 is to be mounted in a computer system 2 and electrically connected to a core-logic chipset 21 of the computer system 2. By executing a RAID card driver, the RAID card 20 is made communicable with the operating system of the computer system 2 for reading and writing tasks. The RAID card 20 principally includes a memory 201 serving as a data buffer, a computing unit 202 for fault-tolerant computing, and a bus controller 203. In this embodiment, the RAID card 20 is in communication with three hard disk drives 27, 28 and 29 which are accessed via the bus controller 203.
As described above, the RAID card 20 needs the memory 201 for data buffering. Generally, with the increase of the storage space of the memory 201, which is desired for the enhancement of access efficiency, the cost of the RAID card 20 undesirably increases. Then the advantages achievable by the RAID card is adversely affected
For assuring of cost-effectiveness, a software RAID system with the memory 201 and the computing unit 202 being exempted from the RAID card 20 is developed. By executing RAID software, the system memory and the central processing unit of the computer system are responsible for data buffering and fault-tolerant computing. Since no additional hardware components (e.g. the memory 201 and the computing unit 202) are required, the cost of the software RAID system is reduced. The software RAID system, however, may impair the performance of the computer system because the system memory and the central processing unit of the computer system are additionally occupied to execute the RAID function.
Furthermore, no matter whether a RAID system is implemented in a software fashion or a hardware fashion, it is necessary to perform the XOR logic operation as mentioned above. An example of the timing for the RAID system of FIG. 2 to execute an XOR operation is illustrated with reference to FIG. 3. In this example, the data D1 stored in the hard disk drive 27 is to be overwritten with the new data D1′, thus an XOR operation of the new data D1′ to be stored into the hard disk drive 27 and the corresponding data D2 stored in the hard disk drive 28 is required to update the corresponding parity data from the data P into the new data P′. For achieving this purpose, the operating system needs to write the new data D1′ into the system memory 22 of the computer system 2, and write the data D2 read from the hard disk drive 28 into the memory 201 before the XOR operation can be performed to obtain the parity data P′=D1′⊕+D2. As shown in the figure, the data D1′ is completely written into the system memory 22 at the time point T0 and the data D2 is completely written into the memory 201 at the time point T1. Therefore, the XOR operation will not be performed until the time point T1 when the data D1′ and D2 are completely transferred. As a result, the completion of the XOR operation will be as late as the time point T2. Such a processing mechanism wastes too much waiting time and is apparently inefficient.